import request from '@/utils/request'

export function getGoodsList(params={}) {
  return request('/Amaidan-Goods-Web/resGoods/change/selectGoodsStatus', {
    method: 'POST',
    data: params
  })
}

// 获取优惠券的分类
export function getCouponClassify(params={}) {
  return request('/Amaidan-Market-Web/market/salCouponSysClass/getCouponSysClassPage', {
    method: 'POST',
    data: params
  })
}

// 添加优惠券
export function addNewCoupon(params={}) {
  return request('/amaidan-web-pc/coupon/template/addTemplate', {
    method: 'POST',
    data: params
  })
}

// 优惠券分类列表
export function fetchClassifyList(params={}) {
  return request('/Amaidan-Market-Web/market/salCouponSysClass/getCouponSysClassPage', {
    method: 'POST',
    data: params
  })
}

// 更新优惠券分类
export function updateClassifyList(params={}) {
  return request('/Amaidan-Market-Web/market/salCouponSysClass/updateCouponSysClass', {
    method: 'POST',
    data: params
  })
}
// 删除优惠券分类
export function delClassifyList(params={}) {
  return request('/Amaidan-Market-Web/market/salCouponSysClass/deleteCouponSysClass', {
    method: 'POST',
    data: params
  })
}

// 新增优惠券分类
export function addClassifyList(params={}) {
  return request('/Amaidan-Market-Web/market/salCouponSysClass/addCouponSysClass', {
    method: 'POST',
    data: params
  })
}

// 结束优惠券
export function overCoupon(params={}) {
  return request('/Amaidan-Market-Web/coupon/end', {
    method: 'POST',
    data: params
  })
}

// 判断该券是否正在参与活动
export function couponJoinActivity(params={}) {
  return request('/Amaidan-Market-Web/market/salActivityRefCoupon/couponJoinActivity', {
    method: 'POST',
    data: params
  })
}

// 获取所有优惠券
export function fetchAllCoupons(params={}) {
  return request('/Amaidan-Market-Web/coupon/page', {
    method: 'POST',
    data: params
  })
}

// 获取所有优惠券
export function delCoupon(params={}) {
  return request('/Amaidan-Market-Web/coupon/delete', {
    method: 'POST',
    data: params
  })
}

// 获取会员列表
export function getMembersList(params={}) {
  return request('/Amaidan-Users-Web/user/userManage/queryUserStatusList', {
    method: 'POST',
    data: params
  })
}
// 查询店内会员等级
export function getVipLevel(params={}) {
  return request('/Amaidan-Users-Web/user/vipLevel/getVipLevelPage', {
    method: 'POST',
    data: params
  })
}
// 查询店内可用优惠券
export function getAvailCouponList(params={}) {
  return request('/Amaidan-Market-Web/coupon/availCouponList', {
    method: 'POST',
    data: params
  })
}

// 发送优惠券
export function batchSendCoupon(params={}) {
  return request('/Amaidan-Market-Web/coupon/batchSendCoupon', {
    method: 'POST',
    data: params
  })
}
